<?php

namespace App\Controllers;

class DoctorName extends \CodeIgniter\Controller {

    public function getIndex() {
        // connect to the model
        $places = new \App\Models\Doctor();
        // retrieve all the records
        $records = $places->findAll();
        // JSON encode and return the result
        return json_encode($records);
    }

}
